/*
 * define.h
 *
 * Created: 29/3/2013 10:36:29 PM
 *  Author: HP
 */ 


#ifndef DEFINE_H_
#define DEFINE_H_

#include <avr/io.h>

//IO pin assignment
/*
1) Red LED                            C0
2) Green LED                          C1
3) Programming switch (may not need)  x2
4) O/C button                         C2
5) To card reader (TX/RX/+/-)         D0/D1
6) servo                              C3
7) BT                                 D2/D3
*/

#define	LED_PORT	PORTB
#define	SVO_PORT	PORTC
#define	LED_1		0
#define	LED_2		1
#define	OC_BTN		2
#define	SVO_PIN		4
#define BT_DATA_LENGTH 5

#define	Led1On()	(LED_PORT|=_BV(LED_1))
#define	Led2On()	(LED_PORT|=_BV(LED_2))
#define	Led1Off()	(LED_PORT&=~(_BV(LED_1)))
#define	Led2Off()	(LED_PORT&=~(_BV(LED_2)))
#define	F_CPU	1000000UL

/* UART baud rate */
#define UART0_BAUD  9600
#define UART1_BAUD  9600

#endif /* DEFINE_H_ */